Refactor Condition.Stats and DirectoryFileTransferTracker.Stats with Builder pattern#19862
Conversation
|
❌ Gradle check result for d34b9e7: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
d34b9e7 to
bdcb3cd
Compare
|
❌ Gradle check result for bdcb3cd: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
bdcb3cd to
0158f39
Compare
|
❌ Gradle check result for 0158f39: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
server/src/main/java/org/opensearch/index/store/DirectoryFileTransferTracker.java
Show resolved
Hide resolved
|
❕ Gradle check result for 82a6b4b: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
82a6b4b to
f427ebb
Compare
|
I'll work on the next Stats class once comments are resolved and this PR is merged! |
Signed-off-by: Sandesh Kumar <sandeshkr419@gmail.com>
|
❌ Gradle check result for 78938ec: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 78938ec: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
…Builder pattern (opensearch-project#19862) Co-authored-by: Sandesh Kumar <sandeshkr419@gmail.com>
Description
This PR refactors the
Condition.StatsandDirectoryFileTransferTracker.Statsclass to use the Builder pattern instead of relying on multiple constructors.By adopting the Builder pattern, it becomes easier to evolve the stats API, add new metrics, and maintain backward compatibility without forcing disruptive constructor changes.
Based on the related issue:
There are multiple stats-related classes that need similar refactoring, and we are addressing them in priority order. This PR covers
Condition.StatsandDirectoryFileTransferTracker.Statsas part of that effort.Related Issues
Related to #19225
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.